package com.turing.selfwebservice.system;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

/**
 * 退出登录
 * 
 * @author 李治
 * 
 */
public class LogoutServlet extends DispatchAction {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		String _url = "logon";
		HttpSession session = request.getSession();
		session.removeAttribute("SessionHashTable");
		session.removeAttribute("userName");
		session.removeAttribute("MerchantOper");
		session.removeAttribute("organization");
		session.removeAttribute("userType");
		return mapping.findForward(_url);
	}

}
